import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from "path";
// https://vitejs.dev/config/

/** 路径查找 */
const pathResolve = (dir: string): string => {
    return resolve(__dirname, ".", dir);
  };

/** 设置别名 */
const alias: Record<string, string> = {
    "@": pathResolve("src"),
    "@build": pathResolve("build")
  };

  export default defineConfig({
    plugins: [vue()],
    resolve: {
        alias
    },
    css: {
    preprocessorOptions: {
      scss: {
        api: 'modern-compiler' // or "modern", "legacy"
      },
    },
  },
  })
  